#include <iostream>

using namespace std;

class Student
{
public:
Student(string _name,float _s){
    name = _name;
    s = _s;
    num += s;
    n++;
}
static void getAvg(){
    cout<<n<<"个学生的平均分为:"<<(num/n)<<endl;
}
private:
    string name;
    static float s;
    static float num;
    static int n;

};
float Student::s = 0;
float Student::num = 0;
int Student::n = 0;

int main(int argc, char const *argv[])
{
    Student S1("学生1",1.1);
    Student S2("学生2",2.2);
    Student S3("学生3",3.3);
    Student S4("学生4",4.4);
    Student::getAvg();

    return 0;
}
